package com.nowcoder.community.dao;

import com.nowcoder.community.entity.Comment;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * <p>Title: CommentMapper</p>
 * <p>author 12427</p>
 *
 * @version ver1.0
 * @date 2022/8/17 18:45
 */
@Mapper
public interface CommentMapper {

    List<Comment> selectCommentsByEntity(int entityType , int entityId , int offset , int limit) ;

    int selectCountByEntity(int entityType , int entityId) ;

    int insertComment(Comment comment) ;

    Comment selectCommentById(int id) ;

    List<Comment> selectCommentsByUser(int userId , int offset , int limit) ;

    int selectCountByUser(int userId) ;

}
